<template>
  <div class="win">
    <div>
      <div class="white_bj1"></div>
      <div class="white_bj2"></div>
    </div>
    <div class="information_box">
      <p class="title">{{information.title}}</p>
      <p class="time">{{information.create_time}}</p>
      <wxParse :content="information.description" />
    </div>
    <i-toast id="toast" />
  </div>
</template>

<script>
import wxParse from "mpvue-wxparse";
export default {
  data() {
    return {
      bjurl: "",
      news_id: 0,
      information: []
    };
  },
  methods: {
    getNews(new_id) {
      this.$ajax("/home/news/news_detail", "post", {
        news_id: this.news_id
      })
        .then(res => {
          

          if (res.status) {
            this.information = res.data;
          } else {
          }
        })
        .catch(err => {});
    }
  },
  components: {
    wxParse
  },
  onLoad(e) {
    Object.assign(this.$data, this.$options.data());
    this.bjurl = this.$bjurl;
    this.news_id = e.news_id;
    this.getNews();
  }
};
</script>

<style lang="scss" scoped>
@import url("~mpvue-wxparse/src/wxParse.css");
.win {
  background: linear-gradient(
    0deg,
    rgba(11, 208, 94, 1),
    rgba(11, 208, 173, 1)
  );
  position: relative;
  .white_bj1 {
    margin: 1.6vh auto 0;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10rpx 10rpx 0 0;
    width: 584rpx;
    height: 1.6vh;
  }
  .white_bj2 {
    margin: 0 auto;
    width: 632rpx;
    height: 1.8vh;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 10rpx 10rpx 0 0;
  }
  .information_box {
    margin: 0 auto;
    box-sizing: border-box;
    width: 666rpx;
    min-height: 95vh;
    box-sizing: border-box;
    background-color: #ffffff;
    border-radius: 10rpx 10rpx 0 0;
    padding: 40rpx 46rpx 60rpx;
    .title {
      text-align: center;
      font-size: 40rpx;
      color: #4d4d4d;
    }
    .time {
      margin-top: 60rpx;
      font-size: 24rpx;
      color: #999999;
    }
    /deep/ .wxParse {
      width: 570rpx;
      line-height: 1.7;
      margin-top: 48rpx;
      font-size: 26rpx;
      color: #4d4d4d;
    }
  }
}
</style>
